import request from '@/utils/request'

export function findByPage(query) {
  return request({
    url: '/book/findByPage',
    method: 'get',
    params:query //表单数据
  })
}


export function deleteBook(bookId) {
  return request({
    url: '/book/deleteById',
    method: 'get',
    params:{"bookId":bookId}//form
  })
}
export function addBook(data) {
  return request({
    url: '/book/add',
    method: 'post',
    data//json
  })
}

export function updateBook(data) {
  return request({
    url: '/book/updateById',
    method: 'post',
    data//json
  })
}

export function findAllList() {
  return request({
    url: '/book/findAllList',
    method: 'get'
  })
}